gusucode.com > Neutrosophic logic toolbox Package_ Neutrosophic Matrices > Neutrosophic logic toolbox Package_ Neutrosophic Matrices/@nm/checknm.m

    function isim=checknm(A)
% neutrosophic matrix checking function.
% Returns 1 if A is intuitionistic matrix, 
% ( if all elememts of the matrix A are neutrosophic numbers 
% i.e. 0<=A.m(i,j)+A.i(i,j)+A.n(i,j)<=3 ) 
% otherwise 0.
% See also getnonim.m
% 
%In the Name of ALLAH
% neutrosphic logic toolbox for computing single valued neutrosophic Matrices 
% Copyright (C) 2015-2019 Broumi said 
%for for details see the refrence:  
%Said Broumi, Le Hoang Son, Assia Bakali, Mohamed Talea, Florentin Smarandache,
%Ganeshsree Selvachandran, Computing Operational Matrices in Neutrosophic Environments:
%A Matlab Toolbox,Neutrosophic Sets and Systems, 18,2017,pp.58-66.
% neutrosphic logic toolbox for computing single valued neutrosophic Matrice comes 
% This is free software, and you are welcome to redistribut;see license.txt for details.

isim=1;

ij=size(A);
for i=1:ij(1)
    for j=1:ij(2)
        if A.m(i,j)+A.i(i,j)+A.n(i,j)>3
            isim=0;
        end
    end
end